<template>
  <div id="screenMap"></div>
</template>
<script>
import Vue from "vue";
export default {
  name: "ScreenMap",
  data() {
    return {};
  },
  mounted() {
    // 将地图实例挂载到Vue原型上
    Vue.prototype.$map = new this.ScreenMap();
    const mapTargetId = "screenMap";
    const baseLayers = [this.$map.createBaseLayer("tdtImg"), this.$map.createBaseLayer("tdtImgTxt")];
    // 初始化地图
    this.$map.init(mapTargetId, baseLayers);
  },
  beforeDestroy() {
    // 销毁地图实例
    this.$map = null;
  },
  methods: {},
};
</script>
<style lang="scss" scoped>
#screenMap {
  width: 100vw;
  height: 100vh;
}
</style>
